A Semantics for Pointcuts and Advice in Higher-Order Languages
نویسندگان
چکیده
Aspect-oriented programming has proven to be a useful model for developing software that encapsulates features in separate modules. AspectJ [3], one popular aspect-oriented language, extends Java with pointcuts and advice, which allow the programmer to modify the execution of existing code. However, formal semantics for pointcuts and advice only cover first-order procedural languages. We wish to port this model of aspect-oriented programming to higher-order languages in order to explore the synergy between the aspect-oriented and functional programming paradigms. To this end, we define an operational semantics for pointcuts and advice in a Scheme-like language. Our formulation relies on two key ideas. First, we define aspects as first-class values, which integrates well with a functional language. Second, we allow an aspect to apply to a section of code either statically or dynamically. Our semantics reduce this distinction to the related notion of static and dynamic scope.
منابع مشابه
Higher-Order Aspects in Order
In aspect-oriented programming languages, advice evaluation is usually considered as part of the base program evaluation. This is also the case for certain pointcuts, such as if pointcuts in AspectJ, or simply all pointcuts in higher-order aspect languages like AspectScheme. While viewing pointcuts and advice as base level computation clearly distinguishes AOP from reflection, it also comes at ...
متن کاملSemantics and scoping of aspects in higher-order languages
Aspect-oriented software design will need to support languages with first-class and higher-order procedures, such as Ruby, Perl, ML and Scheme. These language features present both challenges and benefits for aspects. On the one hand, they force the designer to carefully address issues of scope that do not arise in first-order languages. On the other hand, these distinctions of scope make it po...
متن کاملFOAL 2006 Proceedings Foundations of Aspect - Oriented Languages Workshop at AOSD 2006
In AspectJ-like languages, there are several different kinds of advice declarations, which are specified by using advice modifiers such as before and after returning. This makes semantics of advice complicated and also makes advice declarations less reusable since advice modifiers are not parameterized unlike pointcuts. We propose a simpler join point model and an experimental AOP language call...
متن کاملContinuation Join Points
In AspectJ-like languages, there are several different kinds of advice declarations, which are specified by using advice modifiers such as before and after returning. This makes semantics of advice complicated and also makes advice declarations less reusable since advice modifiers are not parameterized unlike pointcuts. We propose a simpler join point model and an experimental AOP language call...
متن کاملBack to the future Pointcuts as Predicates over Traces
Pointcuts in aspect-oriented languages can be seen as predicates over events in the computation of a program. The ability to express temporal relations between such events is a key feature towards more expressive pointcut languages. In this paper, we describe the design and implementation of a pointcut language within which pointcuts are predicates over the complete execution trace of the progr...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2002